<?php

namespace common\models\dynamic;

use Yii;

/**
 * This is the model class for table "{{%dynamic_stats}}".
 *
 * @property int $id
 * @property string $dynamic_id 文章ID
 * @property string $views 总浏览数
 * @property string $likes 点赞数
 * @property string $comments 评论数
 * @property string $day_views 日浏览数
 * @property string $day_likes 日点赞数
 * @property string $created_at 创建时间
 * @property string $updated_at 更新时间
 */
class DynamicStats extends \yii\db\ActiveRecord {

    use \common\traits\TimestampBehavior;
    use \common\traits\QueryInstanceActiveRecord;

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return '{{%dynamic_stats}}';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['dynamic_id', 'views', 'likes', 'comments', 'day_views', 'day_likes', 'created_at', 'updated_at'], 'integer'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'dynamic_id' => '文章ID',
            'views' => '总浏览数',
            'likes' => '点赞数',
            'comments' => '评论数',
            'day_views' => '日浏览数',
            'day_likes' => '日点赞数',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }

}
